//package com.source.config;
//
//import com.source.interceptor.LoginInterceptor;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//import javax.annotation.Resource;
//
///**
// * @Author ZZF
// * @Time 2021/04/02 2:08
// * @Description 权限控制配置类
// */
//@Configuration
//public class AuthorizationConfig {
//    @Resource
//    private LoginInterceptor loginInterceptor;
//
//    @Bean
//    public WebMvcConfigurer webMvcConfigurer(){
//        return new WebMvcConfigurer(){
//            //注册jwt登录认证拦截器  拦截器1
//            @Override
//            public void addInterceptors(InterceptorRegistry registry) {
//                registry.addInterceptor(loginInterceptor)
//                        .addPathPatterns("/**")//拦截所有请求和静态资源
//                        .excludePathPatterns("/swagger-ui/**","/doc.html/**")//放行swagger-ui
//                        .excludePathPatterns("/swagger-resources/**")
//                        .excludePathPatterns("/v3/**")//放行v3文档
//                        .excludePathPatterns("classpath:/META-INF/**","/webjars/**","/asserts/**")//放行静态资源
//                        .excludePathPatterns("/login","/register","/check/**","/email/**","/get-back-password");//放行登录注册
//            }
//            //权限控制拦截器  拦截器2
//
//
//
//        };
//    }
//}
